Differences between contenttype, charset, and pageencoding
========================================================= ==================
The contenttype attribute specifies the HTTP content type of the response. If contenttype is not specified, the
1, request.setcharacterencoding () is the setting of the value taken from the request or the value taken from the databaseOnce specified, the correct string can be obtained directly through GetParameter (), and if not specified, the ISO8859-1
The use of HTTP header accept-charset?
Accept-charset accept-encoding accept-language in HTTP headers do they work much? Feel the Content-type function is very big.
A program that encounters a person with an easy-to-write page that returns HTML code.
I believe you must have met, open a Web page, but show a heap of like garbled, such as "бїяазъся", "????????"? Remember the message header fields Accept-charset, accept-encoding, Accept-language, content-encoding, content-language in HTTP? And
JSP in Pageencoding, Charset=utf-8 "In the Jsp/servlet, there are several places to set the code, pageencoding= "UTF-8", contenttype= "Text/html;charset=utf-8", Request.setcharacterencoding ("UTF-8") and Response.setcharacterencoding ("UTF-8"),
JSP/Servlet ----- differences between charset and pageEncoding, and between jsp and servlet
I. Functions of several encodings in JSP/ServletIn JSP/Servlet, encoding can be set in four places (as shown below). The first two can only be used in JSP,
HTML form, html formHTML forms contain form elements.
element definition HTML form
Form elements refer to different types of input elements, check boxes, single-choice buttons, and submit buttons.
HTML forms are used to collect different types of
HTML Form Enctype
Http://www.w3.org/TR/html401/interact/forms.html#h-17.13.1%E2%80%8D
enctype=
Content-type [CI]
This
attribute specifies the content type used to submit the form to the server if
The following JavaScript code, through the Document object, iterates through all the HTML elements (HTML DOM element).meta http-equiv="Content-type" Content="text/html; Charset=utf-8 ">head>script> //Display all HTML elements that have an "ID"
Form attributes
Action
Define a URL. Send data to this URL when you click Submit.
4
5
Data
For automatic data insertion.
5
Replace
Define what is done when a form is submitted.
5
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.